You are here: Statements and Functions > Order
Syntax samples
ORDER <expression> <entity> {TO <location>}
ORDER 10 EntA TO Loc2
ORDER Order_Qty_Attr ENT(Entity_Attr) TO LOC(Loc_Attr)
Causes the specified number of entities to be created and placed into the system at the designated location. If the location does not have enough capacity for all the new entities, the excess entities will be destroyed. Attributes from the creating entity will be copied to the resulting entities. Use ORDER to replenish inventories when a particular condition occurs. Such as when an inventory reaches the minimum level.
Any logic.
Components
<expression>
The number of new entities to be ordered. This field is evaluated every time the ORDER statement is encountered, allowing the number ordered to vary as the simulation progresses.
<entity>
The name of the new entities. ENT() may be used for an entity name.
<location>
The destination of the new entities. LOC() may be substituted for the names of locations. If no location is specified, the entities will be ordered to the location of the ORDER statement.
Example
In this example, EntA arrives at LocA1 and triggers an order for 100 EntB’s to LocB1.
Process Table
Entity |
Location |
Operation (min) |
---|---|---|
EntA |
LocA1 |
ORDER 100 EntB TO LocB1 |
EntB |
LocB1 |
... |
Routing Table
Blk |
Output |
Destination |
Rule |
Move Logic |
---|---|---|---|---|
1 |
EntA |
LocA |
FIRST 1 |
MOVE WITH Forklift |
SEND, CREATE, and SPLIT AS.